<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>MessageBox 弹框</title>
    <!-- 引入ElementUI样式 -->
    <link rel="stylesheet" href="element-ui/index.css">
</head>
<body>
<div id="app">
    <el-button type="danger" @click="del">删除</el-button>
</div>

<!-- 先引入vue -->
<script src="js/vue.js"></script>
<!-- 再引入ElementUI组件库 -->
<script src="element-ui/index.js"></script>
<script>
    new Vue({
        el: '#app',
        methods: {
            del(){
                this.$confirm("确定删除该订单？","提示",{
                    confirmButtonText: "确定",
                    cancelButtonText: "取消",
                    type: "warning"
                }).then(() =>{
                    console.log("执行删除操作...");
                }).catch(() =>{
                    console.log("取消操作...");
                })
            }
        }
    });
</script>
</body>
</html>